<?php
class ErrormessageModel extends Model
{
    function handleError()
    {
        $this->loadView('error_template');
        $session = Session::getInstance();
        $data = array();
        if ($session->isExist('em'))
        {
            $data['message'] = $session->get('em');
            $session->remove('em');
        }
        if ($session->isExist('lb'))
        {
            $data['link'] = $session->get('lb');
            $session->remove('lb');
        }
        $this->views['error_template']->setBlockData($data);
        $this->views['error_template']->setBlock('block_content',NULL,FALSE);
        $this->views['error_template']->render();
    }
}
